/*
 *    Copyright 2010 The maven-migrate-plugin Team
 *
 *    Licensed under the Apache License, Version 2.0 (the "License");
 *    you may not use this file except in compliance with the License.
 *    You may obtain a copy of the License at
 *
 *       http://www.apache.org/licenses/LICENSE-2.0
 *
 *    Unless required by applicable law or agreed to in writing, software
 *    distributed under the License is distributed on an "AS IS" BASIS,
 *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *    See the License for the specific language governing permissions and
 *    limitations under the License.
 */
package com.googlecode.mvnmigrate;

import java.io.File;

import org.apache.maven.plugin.testing.AbstractMojoTestCase;

/**
 * @version $Id: AbstractMigrateTestCase.java 132 2010-07-10 17:23:54Z marco.speranza79 $
 */
abstract public class AbstractMigrateTestCase extends AbstractMojoTestCase {

    protected File testPom = new File(getBasedir(), "src/test/resources/unit/basic-test/basic-test-plugin-config.xml");

    public void setUp() throws Exception {
        super.setUp();
    }

    /* (non-Javadoc)
     * @see org.codehaus.plexus.PlexusTestCase#tearDown()
     */
    @Override
    protected void tearDown() throws Exception {
        super.tearDown();
        cleanup();
    }

    public void cleanup() throws Exception {
        File derbyDb = new File("target/database.dat");
        if (derbyDb.exists()) {
            derbyDb.delete();
        }
        derbyDb = new File("target/init");
        if (derbyDb.exists()) {
            derbyDb.delete();
        }
    }

}
